//登录接口
import axios from 'axios'

axios.defaults.baseURL='http://127.0.0.1:5000'

export let login =(params)=> axios.post('/users/checkLogin',params);

//添加账号接口
export let accadd =(params)=> axios.post('/users/add',params);

//添加列表
export let acclist =(params)=> axios.get('/users/list',{params:params});

//删除
export let accdel =(params)=> axios.get('/users/del',{params:params});

//批量删除
export let batchdel =(params)=> axios.get('/users/batchdel',{params:params});
//点击确认修改
export let modify =(params)=> axios.post('/users/edit',params);

//检查旧密码是否正确
export let hangepass =(params)=> axios.get('/users/checkoldpwd',{params:params});
//修改密码
export let editpwd =(params)=> axios.post('/users/editpwd',params);

//获取账号个人中心的信息
export let Perinmation =(params)=> axios.get('/users/accountinfo',{params:params});

//添加分类
export let addcate =(params)=> axios.post('/goods/addcate',params);

//获取分类
export let gainsort =(params)=> axios.get('/goods/catelist',{params:params});

//删除分类
export let delsort =(params)=> axios.get('/goods/delcate',{params:params});

//token
export let checktoken =(params)=> axios.get('/users/checktoken',{params:params});

//主页用户头像
export let headimg =(params)=> axios.post('/users/avatar_upload',params);


//获取商品分类
export let getshoplist =(params)=> axios.get('/goods/list',{params:params});

//修改分类
export let editcate =(params)=> axios.post('/goods/editcate',params);

//添加商品
export let addshop =(params)=> axios.post('/goods/add',params);

//查询所有分类名称
export let allshopsort =(params)=> axios.get('/goods/categories',{params:params});
//商品删除
export let shopDel =(params)=> axios.get('/goods/del',{params:params});

//修改商品
export let goodedit =(params)=> axios.post('/goods/edit',params);









